package com.hzhr.iot.toll.convertor;

import com.hzhr.iot.toll.convertor.custom.*;
import com.hzhr.iot.core.util.HzhrTypeUtil;
import com.hzhr.iot.core.util.HzhrJsonUtil;
import java.util.Map;
import com.hzhr.iot.toll.model.gasUser.GasUserModel;
import com.hzhr.iot.toll.model.gasUser.GasUserPostModel;
import com.hzhr.iot.toll.model.gasUser.GasUserPutModel;
import com.hzhr.iot.toll.entity.GasUserEntity;
import com.hzhr.iot.toll.entity.ext.GasUserEntityExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.hzhr.iot.toll.model.gasUser.GasUserModel;
import com.hzhr.iot.toll.model.gasUser.GasUserGetModel;
import com.hzhr.iot.toll.model.gasUser.GasUserPostModel;
import com.hzhr.iot.toll.model.gasUser.GasUserPutModel;
import com.hzhr.iot.toll.model.gasUser_basicInfo.GasUser_BasicInfoModel;
import com.hzhr.iot.toll.model.gasUser_basicInfo.GasUser_BasicInfoGetModel;
import com.hzhr.iot.toll.queryModel.custom.GasUserCustomQueryModel;

@Component
public class GasUserConvertor {
    @Autowired
    OptionsCustomConvertor optionsCustomConvertor;
    @Autowired
    UserGasUserCustomConvertor userGasUserCustomConvertor;

    public GasUserEntity gasUserModel2entity(GasUserModel in) {
        //未转换字段: createUserId createTime updateUserId isValid outId updateTime state 
        if (in == null) return null;
        GasUserEntity result = new GasUserEntity();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        result.setResourceCode(HzhrTypeUtil.string2string(in.getResourceCode()));
        result.setGasConsume(HzhrTypeUtil.double2double(in.getGasConsume()));
        result.setCollectDeviceCount(HzhrTypeUtil.integer2integer(in.getCollectDeviceCount()));
        return result;
    }
    public GasUserEntity gasUserModel2entity(GasUserModel in, GasUserEntity ori) {
        //未转换字段: createUserId createTime updateUserId isValid outId updateTime state 
        if (in == null) return null;
        GasUserEntity result = ori;

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        result.setResourceCode(HzhrTypeUtil.string2string(in.getResourceCode()));
        result.setGasConsume(HzhrTypeUtil.double2double(in.getGasConsume()));
        result.setCollectDeviceCount(HzhrTypeUtil.integer2integer(in.getCollectDeviceCount()));
        return result;
    }
    public List<GasUserEntity> gasUserModelList2entityList(List<GasUserModel> in) {
        if (in == null) return null;
        List<GasUserEntity> result = new ArrayList<>();
        for (GasUserModel item : in) {
            result.add(gasUserModel2entity(item));
        }
        return result;
    }
    public GasUserModel entity2gasUserModel(GasUserEntity in) {
        //未转换字段: deptName typeDes 
        if (in == null) return null;
        GasUserModel result = new GasUserModel();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        result.setGasConsume(HzhrTypeUtil.double2double(in.getGasConsume()));
        result.setCollectDeviceCount(HzhrTypeUtil.integer2integer(in.getCollectDeviceCount()));
        result.setResourceCode(HzhrTypeUtil.string2string(in.getResourceCode()));
        return result;
    }
    public List<GasUserModel> entityList2gasUserModelList(List<GasUserEntity> in) {
        if (in == null) return null;
        List<GasUserModel> result = new ArrayList<>();
        for (GasUserEntity item : in) {
            result.add(entity2gasUserModel(item));
        }
        return result;
    }
    public GasUserModel ext2gasUserModel(GasUserEntityExt in) {
        //未转换字段: deptName typeDes 
        if (in == null) return null;
        GasUserModel result = new GasUserModel();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        result.setGasConsume(HzhrTypeUtil.double2double(in.getGasConsume()));
        result.setCollectDeviceCount(HzhrTypeUtil.integer2integer(in.getCollectDeviceCount()));
        result.setResourceCode(HzhrTypeUtil.string2string(in.getResourceCode()));
        return result;
    }
    public List<GasUserModel> extList2gasUserModelList(List<GasUserEntityExt> in) {
        if (in == null) return null;
        List<GasUserModel> result = new ArrayList<>();
        for (GasUserEntityExt item : in) {
            result.add(ext2gasUserModel(item));
        }
        return result;
    }
    public GasUserGetModel extList2gasUserGetModel(List<GasUserEntityExt> extList, Integer total, Integer changeCount, Map<String, Object> query) {
        List<GasUserModel> modelList = extList2gasUserModelList(extList);
        if (modelList == null) {
            GasUserGetModel result = new GasUserGetModel();
            result.setTotal(total);
            result.setChangeCount(changeCount);
            return result;
        }

         String _show = HzhrTypeUtil.object2string(query.get("_show"));
         Boolean _show_info = query.get("_show_info") != null ? Boolean.parseBoolean(query.get("_show_info").toString()) : false;
         Boolean _show_dept = query.get("_show_dept") != null ? Boolean.parseBoolean(query.get("_show_dept").toString()) : false;

        if (!_show_info) {
            for (GasUserModel model : modelList) {
                model.setCode(null);
                model.setName(null);
                model.setAddress(null);
                model.setPhone(null);
                model.setTypeCode(null);
                model.setTypeDes(null);
                model.setCompanyId(null);
                model.setDeptId(null);
                model.setRemark(null);
                model.setResourceCode(null);
                model.setGasConsume(null);
                model.setCollectDeviceCount(null);
            }
        }
        if (!_show_dept) {
            for (GasUserModel model : modelList) {
                model.setDeptName(null);
            }
        }

        GasUserGetModel result = new GasUserGetModel();
        if ("one".equals(_show)) {
            if (modelList.size() > 0) {
                result.setModel(modelList.get(0));
            }
         }
        if ("list".equals(_show)) {
            result.setModelList(modelList);
        }
        result.setTotal(total);
        result.setChangeCount(changeCount);
        return result;
    }
    public GasUserGetModel entity2gasUserGetModel(GasUserEntity entity, Integer total, Integer changeCount, Map<String, Object> query) {
        List<GasUserEntityExt> extList = new ArrayList<>();
        if (entity == null) return extList2gasUserGetModel(extList, total, changeCount, query);
        extList.add(HzhrJsonUtil.convertObjectType(entity, GasUserEntityExt.class));
        return extList2gasUserGetModel(extList, total, changeCount, query);
     }
    public GasUserEntity gasUserPostModel2entity(GasUserPostModel in) {
        //未转换字段: createUserId updateUserId isValid deptId updateTime companyId gasConsume collectDeviceCount resourceCode createTime outId id state 
        if (in == null) return null;
        GasUserEntity result = new GasUserEntity();

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public GasUserEntity gasUserPostModel2entity(GasUserPostModel in, GasUserEntity ori) {
        //未转换字段: createUserId updateUserId isValid deptId updateTime companyId gasConsume collectDeviceCount resourceCode createTime outId id state 
        if (in == null) return null;
        GasUserEntity result = ori;

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public List<GasUserEntity> gasUserPostModelList2entityList(List<GasUserPostModel> in) {
        if (in == null) return null;
        List<GasUserEntity> result = new ArrayList<>();
        for (GasUserPostModel item : in) {
            result.add(gasUserPostModel2entity(item));
        }
        return result;
    }
    public GasUserPostModel entity2gasUserPostModel(GasUserEntity in) {
        //未转换字段: 
        if (in == null) return null;
        GasUserPostModel result = new GasUserPostModel();

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public List<GasUserPostModel> entityList2gasUserPostModelList(List<GasUserEntity> in) {
        if (in == null) return null;
        List<GasUserPostModel> result = new ArrayList<>();
        for (GasUserEntity item : in) {
            result.add(entity2gasUserPostModel(item));
        }
        return result;
    }
    public GasUserPostModel ext2gasUserPostModel(GasUserEntityExt in) {
        //未转换字段: 
        if (in == null) return null;
        GasUserPostModel result = new GasUserPostModel();

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public List<GasUserPostModel> extList2gasUserPostModelList(List<GasUserEntityExt> in) {
        if (in == null) return null;
        List<GasUserPostModel> result = new ArrayList<>();
        for (GasUserEntityExt item : in) {
            result.add(ext2gasUserPostModel(item));
        }
        return result;
    }
    public GasUserEntity gasUserPutModel2entity(GasUserPutModel in) {
        //未转换字段: createUserId updateUserId isValid deptId updateTime companyId gasConsume collectDeviceCount resourceCode createTime outId id state 
        if (in == null) return null;
        GasUserEntity result = new GasUserEntity();

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public GasUserEntity gasUserPutModel2entity(GasUserPutModel in, GasUserEntity ori) {
        //未转换字段: createUserId updateUserId isValid deptId updateTime companyId gasConsume collectDeviceCount resourceCode createTime outId id state 
        if (in == null) return null;
        GasUserEntity result = ori;

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public List<GasUserEntity> gasUserPutModelList2entityList(List<GasUserPutModel> in) {
        if (in == null) return null;
        List<GasUserEntity> result = new ArrayList<>();
        for (GasUserPutModel item : in) {
            result.add(gasUserPutModel2entity(item));
        }
        return result;
    }
    public GasUserPutModel entity2gasUserPutModel(GasUserEntity in) {
        //未转换字段: 
        if (in == null) return null;
        GasUserPutModel result = new GasUserPutModel();

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public List<GasUserPutModel> entityList2gasUserPutModelList(List<GasUserEntity> in) {
        if (in == null) return null;
        List<GasUserPutModel> result = new ArrayList<>();
        for (GasUserEntity item : in) {
            result.add(entity2gasUserPutModel(item));
        }
        return result;
    }
    public GasUserPutModel ext2gasUserPutModel(GasUserEntityExt in) {
        //未转换字段: 
        if (in == null) return null;
        GasUserPutModel result = new GasUserPutModel();

        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        result.setPhone(HzhrTypeUtil.long2long(in.getPhone()));
        result.setTypeCode(HzhrTypeUtil.string2string(in.getTypeCode()));
        result.setRemark(HzhrTypeUtil.string2string(in.getRemark()));
        return result;
    }
    public List<GasUserPutModel> extList2gasUserPutModelList(List<GasUserEntityExt> in) {
        if (in == null) return null;
        List<GasUserPutModel> result = new ArrayList<>();
        for (GasUserEntityExt item : in) {
            result.add(ext2gasUserPutModel(item));
        }
        return result;
    }
    public GasUserEntity gasUser_BasicInfoModel2entity(GasUser_BasicInfoModel in) {
        //未转换字段: createUserId updateUserId isValid deptId remark updateTime typeCode companyId gasConsume collectDeviceCount resourceCode phone createTime outId state 
        if (in == null) return null;
        GasUserEntity result = new GasUserEntity();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        return result;
    }
    public GasUserEntity gasUser_BasicInfoModel2entity(GasUser_BasicInfoModel in, GasUserEntity ori) {
        //未转换字段: createUserId updateUserId isValid deptId remark updateTime typeCode companyId gasConsume collectDeviceCount resourceCode phone createTime outId state 
        if (in == null) return null;
        GasUserEntity result = ori;

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        return result;
    }
    public List<GasUserEntity> gasUser_BasicInfoModelList2entityList(List<GasUser_BasicInfoModel> in) {
        if (in == null) return null;
        List<GasUserEntity> result = new ArrayList<>();
        for (GasUser_BasicInfoModel item : in) {
            result.add(gasUser_BasicInfoModel2entity(item));
        }
        return result;
    }
    public GasUser_BasicInfoModel entity2gasUser_BasicInfoModel(GasUserEntity in) {
        //未转换字段: userId 
        if (in == null) return null;
        GasUser_BasicInfoModel result = new GasUser_BasicInfoModel();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        return result;
    }
    public List<GasUser_BasicInfoModel> entityList2gasUser_BasicInfoModelList(List<GasUserEntity> in) {
        if (in == null) return null;
        List<GasUser_BasicInfoModel> result = new ArrayList<>();
        for (GasUserEntity item : in) {
            result.add(entity2gasUser_BasicInfoModel(item));
        }
        return result;
    }
    public GasUser_BasicInfoModel ext2gasUser_BasicInfoModel(GasUserEntityExt in) {
        //未转换字段: userId 
        if (in == null) return null;
        GasUser_BasicInfoModel result = new GasUser_BasicInfoModel();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setName(HzhrTypeUtil.string2string(in.getName()));
        result.setAddress(HzhrTypeUtil.string2string(in.getAddress()));
        return result;
    }
    public List<GasUser_BasicInfoModel> extList2gasUser_BasicInfoModelList(List<GasUserEntityExt> in) {
        if (in == null) return null;
        List<GasUser_BasicInfoModel> result = new ArrayList<>();
        for (GasUserEntityExt item : in) {
            result.add(ext2gasUser_BasicInfoModel(item));
        }
        return result;
    }
    public GasUser_BasicInfoGetModel extList2gasUser_BasicInfoGetModel(List<GasUserEntityExt> extList, Integer total, Integer changeCount, Map<String, Object> query) {
        List<GasUser_BasicInfoModel> modelList = extList2gasUser_BasicInfoModelList(extList);
        if (modelList == null) {
            GasUser_BasicInfoGetModel result = new GasUser_BasicInfoGetModel();
            result.setTotal(total);
            result.setChangeCount(changeCount);
            return result;
        }

         String _show = HzhrTypeUtil.object2string(query.get("_show"));
         Boolean _show_user = query.get("_show_user") != null ? Boolean.parseBoolean(query.get("_show_user").toString()) : false;
         Boolean _show_info = query.get("_show_info") != null ? Boolean.parseBoolean(query.get("_show_info").toString()) : false;

        if (!_show_user) {
            for (GasUser_BasicInfoModel model : modelList) {
                model.setUserId(null);
            }
        }
        if (!_show_info) {
            for (GasUser_BasicInfoModel model : modelList) {
                model.setCode(null);
                model.setName(null);
                model.setAddress(null);
            }
        }

        GasUser_BasicInfoGetModel result = new GasUser_BasicInfoGetModel();
        if ("one".equals(_show)) {
            if (modelList.size() > 0) {
                result.setModel(modelList.get(0));
            }
         }
        if ("list".equals(_show)) {
            result.setModelList(modelList);
        }
        result.setTotal(total);
        result.setChangeCount(changeCount);
        return result;
    }
    public GasUser_BasicInfoGetModel entity2gasUser_BasicInfoGetModel(GasUserEntity entity, Integer total, Integer changeCount, Map<String, Object> query) {
        List<GasUserEntityExt> extList = new ArrayList<>();
        if (entity == null) return extList2gasUser_BasicInfoGetModel(extList, total, changeCount, query);
        extList.add(HzhrJsonUtil.convertObjectType(entity, GasUserEntityExt.class));
        return extList2gasUser_BasicInfoGetModel(extList, total, changeCount, query);
     }
    public GasUserCustomQueryModel gasUserService_query2queryModel(Map<String, Object> query) {
        GasUserCustomQueryModel queryModel = new GasUserCustomQueryModel();

        Integer _equal_id = HzhrTypeUtil.object2integer(query.get("_equal_id"));
        if (_equal_id != null) {
            queryModel.setEqual_id(_equal_id);
         }

        String _equal_code = HzhrTypeUtil.object2string(query.get("_equal_code"));
        if (_equal_code != null) {
            queryModel.setEqual_code(_equal_code);
         }

        Integer _equal_companyId = HzhrTypeUtil.object2integer(query.get("_equal_companyId"));
        if (_equal_companyId != null) {
            queryModel.setEqual_companyId(_equal_companyId);
         }

        Integer _equal_deptId = HzhrTypeUtil.object2integer(query.get("_equal_deptId"));
        if (_equal_deptId != null) {
            queryModel.setEqual_deptId(_equal_deptId);
         }

        Date _greaterthanorequal_createTime = HzhrTypeUtil.object2date(query.get("_greaterthanorequal_createTime"));
        if (_greaterthanorequal_createTime != null) {
            queryModel.setGreaterthanorequal_createTime(_greaterthanorequal_createTime);
         }

        Date _lessthan_createTime = HzhrTypeUtil.object2date(query.get("_lessthan_createTime"));
        if (_lessthan_createTime != null) {
            queryModel.setLessthan_createTime(_lessthan_createTime);
         }

        String _like_name = HzhrTypeUtil.object2string(query.get("_like_name"));
        if (_like_name != null) {
            queryModel.setLike_name(_like_name);
         }

        String _like_address = HzhrTypeUtil.object2string(query.get("_like_address"));
        if (_like_address != null) {
            queryModel.setLike_address(_like_address);
         }

        String _equal_typeCode = HzhrTypeUtil.object2string(query.get("_equal_typeCode"));
        if (_equal_typeCode != null) {
            queryModel.setEqual_typeCode(_equal_typeCode);
         }

        Boolean _show_info = HzhrTypeUtil.object2boolean(query.get("_show_info"));
        if (_show_info != null && _show_info) {
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setExt_typeExt(true);
            queryModel.setShow1(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
        }
        Boolean _show_dept = HzhrTypeUtil.object2boolean(query.get("_show_dept"));
        if (_show_dept != null && _show_dept) {
            queryModel.setShow(true);
        }

        Integer page = HzhrTypeUtil.object2integer(query.get("_page"));
        Integer count = HzhrTypeUtil.object2integer(query.get("_count"));
        queryModel.setPage(page, count);

        return queryModel;
    }
    public GasUserCustomQueryModel gasUser_BasicInfoService_query2queryModel(Map<String, Object> query) {
        GasUserCustomQueryModel queryModel = new GasUserCustomQueryModel();

        Integer _equal_id = HzhrTypeUtil.object2integer(query.get("_equal_id"));
        if (_equal_id != null) {
            queryModel.setEqual_id(_equal_id);
         }

        String _equal_code = HzhrTypeUtil.object2string(query.get("_equal_code"));
        if (_equal_code != null) {
            queryModel.setEqual_code(_equal_code);
         }

        Integer _equal_companyId = HzhrTypeUtil.object2integer(query.get("_equal_companyId"));
        if (_equal_companyId != null) {
            queryModel.setEqual_companyId(_equal_companyId);
         }

        List _in_id = HzhrTypeUtil.object2list(query.get("_in_id"));
        if (_in_id != null) {
            queryModel.setIn_id(_in_id);
         }

        Integer _equal_userId = HzhrTypeUtil.object2integer(query.get("_equal_userId"));
        if (_equal_userId != null) {
            queryModel.setEqual_userExt_userId(_equal_userId);
         }

        Boolean _show_user = HzhrTypeUtil.object2boolean(query.get("_show_user"));
        if (_show_user != null && _show_user) {
            queryModel.setExt_userExt(true);
            queryModel.setShow2(true);
        }
        Boolean _show_info = HzhrTypeUtil.object2boolean(query.get("_show_info"));
        if (_show_info != null && _show_info) {
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
        }

        Integer page = HzhrTypeUtil.object2integer(query.get("_page"));
        Integer count = HzhrTypeUtil.object2integer(query.get("_count"));
        queryModel.setPage(page, count);

        return queryModel;
    }

}

